from flask import  Flask

from app.ext import init_ext
from app.setting import envs
from app.view import init_view


def creat_app(env):
    app = Flask(__name__)

    app.config.from_object(envs.get(env))
    init_view(app=app)
    init_ext(app)



    return app
